FAQ - III
Answer: Device management is the function of an operating system responsible for managing hardware I/O devices such as:
Answer: Polling is an I/O technique in which the CPU repeatedly checks a device to determine whether it requires service. The CPU continues checking until the device becomes ready. Polling can waste CPU time because the CPU repeatedly checks the device even when no I/O event has occurred.
Answer:
| Polling | Interrupt-Driven I/O |
|---|---|
| CPU repeatedly checks device status | Device sends an interrupt when service is needed |
| CPU may waste time checking | CPU can perform other work |
| Simple to implement | More complex |
| Suitable in some simple systems | Generally more efficient for asynchronous events |
Answer: Direct Memory Access (DMA) is a technique that allows an I/O device to transfer data directly to or from main memory without requiring the CPU to handle every individual byte or word.
CPU --> DMA Controller --> Device, Main MemoryAnswer: Multithreading can improve performance because multiple threads can execute different parts of a program concurrently. Advantages include:
Single Thread: CPU --> Computation --> I/O wait -- > Computation
Multiple Threads:
Answer:
| Authentication | Authorization |
|---|---|
| Verifies who the user is | Determines what the user is allowed to do |
| Happens before authorization | Usually occurs after authentication |
| Example: username/password | Example: permission to delete a product |
| Answers: Who are you? | Answers: What can you do? |